#include <iostream>
#include <string>
#include <windows.h>
using namespace std;

typedef void (*P)();
typedef void (*P2)(string);

int main()
{
    cout << "main func start" << endl;

    HMODULE h;
    h = LoadLibraryA("dynamic");
    if(!h)
    {
        cout<<"err"<<endl;
    }

    P ptr1 = (P)GetProcAddress(h,"call");
    P2 ptr2 = (P2)GetProcAddress(h,"call_again");

    ptr1();

    ptr2("handsomeboy");

    FreeLibrary(h);


    return 0;
}